﻿<%@ Page Language="C#" MasterPageFile="~/MuseumOwner.master" AutoEventWireup="true"
    CodeFile="PasswordReset.aspx.cs" Inherits="PasswordReset" Title="Password Reset" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
<script language="javascript" type="text/javascript">
        function Validate() {
            if (document.getElementById("<%=txtNewPassword.ClientID%>").value == "") {
                alert("New Password can not be blank.");
                document.getElementById("<%=txtNewPassword.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtConfirmNewPassword.ClientID%>").value == "") {
                alert("Confirm New Password can not be blank.");
                document.getElementById("<%=txtConfirmNewPassword.ClientID%>").focus();
                return false;
            }
            if (document.getElementById("<%=txtConfirmNewPassword.ClientID%>").value != document.getElementById("<%=txtNewPassword.ClientID%>").value) {
                alert("New Password and Confirm New Password are not same.");
                document.getElementById("<%=txtConfirmNewPassword.ClientID%>").focus();
                return false;
            } 
            return true;
        }
    </script>
    <table width="100%" cellspacing="1" cellpadding="1" border="0">
        <tr>
            <td colspan="3" align="center">
                <b style="font-size: x-large;">Manage Users</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblOption" Text="Option" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddlOption" runat="server" Width="200px" 
                    AutoPostBack="true" onselectedindexchanged="ddlOption_SelectedIndexChanged">
                    <asp:ListItem Selected="True" Text="Museum" Value="0"></asp:ListItem>
                    <asp:ListItem Text="School" Value="1"></asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblMuseumName" Text="Museum/School" runat="server"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:DropDownList ID="ddlMuseum" runat="server" Width="200px" AutoPostBack="true" OnSelectedIndexChanged="ddlMuseum_SelectedIndexChanged">
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblUserName" runat="server" Text="User Name" Width="200px"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtUserName" runat="server" Width="200px"></asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblNewPassword" runat="server" Text="New Password"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtNewPassword" runat="server" Width="200px" MaxLength="20" TextMode="Password"></asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Label ID="lblConfirmNewPassword" runat="server" Text="Confirm New Password"></asp:Label>
            </td>
            <td>
                :
            </td>
            <td>
                <asp:TextBox ID="txtConfirmNewPassword" runat="server" Width="200px" TextMode="Password" MaxLength="20"></asp:TextBox>
                &nbsp;<b style="color: red;">*</b>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
            <td>
                &nbsp;
            </td>
            <td>
                <asp:Button ID="btnSubmit" Text="Submit" runat="server" OnClick="btnSubmit_Click" 
                    OnClientClick="return Validate();" />&nbsp;&nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="3">
                <asp:Label ID="lblMessage" runat="server" ForeColor="Red" Visible="true"></asp:Label>
            </td>
        </tr>
    </table>
</asp:Content>
